import { Component, OnInit, Input } from '@angular/core';

@Component({
  selector: 'app-stoke-list',
  templateUrl: './stoke-list.component.html',
  styleUrls: ['./stoke-list.component.css']
})
export class StokeListComponent implements OnInit {
  stocks = [];

  constructor() { }

  ngOnInit() {
    this.stocks = [
      new Stoke(1, '第一只股票', 1.99, 5, '这是一只股票', ['it']),
      new Stoke(1, '第二只股票', 1.99, 3, '这是一只股票', ['it']),
      new Stoke(1, '第3只股票', 1.99, 2, '这是一只股票', ['it']),
      new Stoke(1, '第4只股票', 1.99, 1, '这是一只股票', ['it']),
      new Stoke(1, '第5只股票', 1.99, 3.5, '这是一只股票', ['it']),
      new Stoke(1, '第6只股票', 1.99, 3.5, '这是一只股票', ['it']),
      new Stoke(1, '第7只股票', 1.99, 3.5, '这是一只股票', ['it']),
      new Stoke(1, '第8只股票', 1.99, 3.5, '这是一只股票', ['it']),
      new Stoke(1, '第9只股票', 1.99, 3.5, '这是一只股票', ['it']),
      new Stoke(1, '第10只股票', 1.99, 3.5, '这是一只股票', ['it']),
    ];
  }

}
export class Stoke {
  constructor(
    public id: number,
    public name: string,
    public price: number,
    public pcating: number,
    public desc: string,
    public categories: Array<string>,
  ) {

  }
}
